package com.sgcc.pda.gis;

import android.os.Parcel;
import android.os.Parcelable;


/**
 * 作者：LiuChang
 * 时间：2018/12/19 10:52
 * 说明：经纬度信息
 */
public class LocationResult implements Parcelable {
    /**成功失败的标志  0：成功  其他失败*/
    private int code;

    /**返回的数据 具体参考对应方法的返回值*/
    private double lon;//经度
    private double lat;//纬度
    private String time;//时间

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public double getLon() {
        return lon;
    }

    public void setLon(double lon) {
        this.lon = lon;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.code);
        dest.writeDouble(this.lon);
        dest.writeDouble(this.lat);
        dest.writeString(this.time);
    }

    public void readFromParcel(Parcel in) {
        this.code = in.readInt();
        this.lon = in.readDouble();
        this.lat = in.readDouble();
        this.time = in.readString();
    }

    public LocationResult() {
    }

    protected LocationResult(Parcel in) {
        this.code = in.readInt();
        this.lon = in.readDouble();
        this.lat = in.readDouble();
        this.time = in.readString();
    }


    public static final Creator<LocationResult> CREATOR = new Creator<LocationResult>() {
        @Override
        public LocationResult createFromParcel(Parcel source) {
            return new LocationResult(source);
        }

        @Override
        public LocationResult[] newArray(int size) {
            return new LocationResult[size];
        }
    };
}